package com.oa.android.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.oa.android.R;
import com.oa.android.entry.Ric;
import com.oa.android.utils.Util;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
 * 日程详情
 * Created by zouqh on 2016/6/18.
 */
public class RicDetailActivity extends Activity implements View.OnClickListener{

    @InjectView(R.id.close)
    ImageView close;
    @InjectView(R.id.title_text)
    TextView titleText;
    @InjectView(R.id.ritgh_icon)
    ImageView ritghIcon;
    @InjectView(R.id.ritgh_text)
    TextView ritghText;
    @InjectView(R.id.type)
    TextView type;
    @InjectView(R.id.startTime)
    TextView startTime;
    @InjectView(R.id.endTime)
    TextView endTime;
    @InjectView(R.id.context)
    TextView context;
    @InjectView(R.id.zhut)
    TextView zhut;
    @InjectView(R.id.shereP)
    TextView shereP;

    @InjectView(R.id.name)
    TextView name;

    private Ric ric;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.ric_details_activity);
        ButterKnife.inject(this);
        ric= (Ric) getIntent().getSerializableExtra("ric");
        titleText.setText("日程详情");
        close.setOnClickListener(this);
        if (ric!=null){
            zhut.setText(ric.getTITLE()+"");
            context.setText(ric.getCONTENT()+"");
            endTime.setText("结束时间："+ric.getENDTIME());
            startTime.setText("开始时间："+ric.getBEGINTIME());

            type.setText("类型："+ric.getRCLX());
            name.setText("创建人："+ric.getOPTIME());
            if(Util.NoNull(ric.getEMPNAMES())){
                shereP.setText("共享人："+ric.getEMPNAMES());
            }

        }


    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.close:
                finish();
                break;
        }
    }
}
